API reference / Sandbox

Create a test buyer with a shipping address; response shippingAddress.id is minted (`addr_*`)

POST/open/v1/sandbox/buyersScope: No data scope

Service Endpoint Seller token not required

EnvironmentBase URL + Path
Productionhttps://open.mallplus.ph/open/v1/sandbox/buyers
Sandboxhttps://sandbox.open.mallplus.ph/open/v1/sandbox/buyers
Common Signing and Seller Headers
HeaderTypeRequiredRulesDescription
X-MallPlus-Partner-IdstringYesIssued client ID for the calling app.Identifies the partner app whose secret signs the request.
X-MallPlus-TimestampintegerYesUnix timestamp in seconds; default acceptance window is 90 seconds.Prevents replay outside the allowed signing window.
X-MallPlus-Signature-VersionstringYesUse 3 for HMAC v3.Selects the request signing algorithm.
X-MallPlus-NoncestringYes32-64 lowercase hexadecimal characters, unique per request.Replay-protection nonce included in the v3 signing base string.
X-MallPlus-SignaturestringYesHMAC-SHA256 over timestamp, client ID, method, path, canonical query, body hash, and nonce.Cryptographic proof that the request was signed with the app secret.
X-MallPlus-Access-TokenstringConditionalRequired when the operation says seller token required.Seller OAuth access token returned by the authorization flow.
X-MallPlus-Seller-IdstringConditionalRequired when X-MallPlus-Access-Token is required.Seller ID bound to the seller OAuth token.

Parameters

NameInTypeRequiredRulesDescription
Idempotency-KeyheaderstringNoMin length: 1Recommended UUID per logical operation. Retry with the same key and a byte-identical body. Omitting the header still runs the mutation and sets X-MallPlus-Idempotency: absent.

Request Body required

FieldTypeRequiredRulesDescription
namestringYesMin length: 1; Max length: 120Partner-visible name.
emailstring<email>YesFormat: email; Max length: 254Email address.
phoneNumberstringYesMin length: 1; Max length: 40Contact phone number.
shippingAddressSandboxBuyerShippingAddressRequestYesNo additional propertiesShipping address details.
shippingAddress.line1stringYesMin length: 1; Max length: 200First line of the street address.
shippingAddress.line2stringNoMax length: 200Second line of the street address, when present.
shippingAddress.citystringYesMin length: 1; Max length: 100PSGC-aligned Philippine city or municipality.
shippingAddress.regionstringYesMin length: 1; Max length: 100PSGC-aligned Philippine region.
shippingAddress.postalCodestringYesMin length: 1; Max length: 20Postal code for the address.
shippingAddress.countrystringYesMin length: 2; Max length: 2ISO 3166-1 alpha-2 country code.

Response Parameters

Success status: HTTP 201

FieldTypeRulesDescription
successboolean-Whether the sandbox buyer request succeeded.
dataSandboxBuyerNo additional propertiesResponse or event payload for this schema.
data.idstring-Sandbox buyer identifier used by sandbox order flows.
data.namestring-Display name of the test buyer.
data.emailstring<email>Format: emailEmail address assigned to the test buyer.
data.phoneNumberstring-Phone number assigned to the test buyer.
data.shippingAddressSandboxBuyerShippingAddressNo additional propertiesShipping address details.
data.shippingAddress.idstring-Server-minted shipping-address identifier. Record this as ADDRESS-1; echoed on the order after place.
data.shippingAddress.line1string-Primary street address line.
data.shippingAddress.line2string-Optional secondary street address line such as unit or floor.
data.shippingAddress.citystring-PSGC-aligned Philippine city or municipality.
data.shippingAddress.regionstring-PSGC-aligned Philippine region.
data.shippingAddress.postalCodestring-Postal code for the sandbox buyer shipping address.
data.shippingAddress.countrystring-ISO 3166-1 alpha-2 country code for the shipping address.
data.createdAtstring<date-time>Format: date-timeISO-8601 UTC timestamp when the sandbox buyer was created.
data.updatedAtstring<date-time>Format: date-timeISO-8601 UTC timestamp when the sandbox buyer was last updated.

Error Codes

HTTP StatusSchemaDescription
400PlatformError400ResponseValidation error, or a missing/malformed required signing header (BAD_REQUEST)
401PlatformError401ResponseUnauthorized — invalid credentials, invalid signature, or expired timestamp (TIMESTAMP_EXPIRED)
403PlatformError403ResponseForbidden — insufficient scope
409Unenumerated409ErrorResponseThe request conflicts with the current resource state or reuses an idempotency key
413PlatformError413ResponseThe request body exceeds the endpoint payload limit
429PlatformError429ResponseThe partner or endpoint rate limit has been exceeded
503PlatformError503ResponseA required platform or upstream dependency is temporarily unavailable

This operation does not declare its own error.code list. Any operation can return the authentication, signing, scope, rate-limit and system codes listed in the Error code reference.

Request Example

curl -X POST "https://sandbox.open.mallplus.ph/open/v1/sandbox/buyers" \
  -H "X-MallPlus-Partner-Id: mp_partner_123" \
  -H "X-MallPlus-Timestamp: 1786924800" \
  -H "X-MallPlus-Signature-Version: 3" \
  -H "X-MallPlus-Nonce: 4f8b9a0c4d5e6f708192a3b4c5d6e7f8" \
  -H "X-MallPlus-Signature: <hex_hmac_sha256>" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  --data '{
  "name": "example_name",
  "email": "partner@example.com",
  "phoneNumber": "example_phoneNumber",
  "shippingAddress": {
    "line1": "example_line1",
    "line2": "example_line2",
    "city": "example_city",
    "region": "example_region",
    "postalCode": "example_postalCode",
    "country": "example_country"
  }
}'

Response Example

{
  "success": true,
  "data": {
    "id": "buy_test_contract",
    "name": "Test Buyer",
    "email": "buyer@example.com",
    "phoneNumber": "+639001234567",
    "shippingAddress": {
      "id": "addr_test_contract",
      "line1": "123 Test St",
      "city": "Manila",
      "region": "NCR",
      "postalCode": "1000",
      "country": "PH"
    },
    "createdAt": "2026-08-26T04:00:00.000Z",
    "updatedAt": "2026-08-26T04:00:00.000Z"
  }
}