Skip to main content

Pay-In · Bolivia

TOPPAY TeamAbout 2 min

Request

The Pay-In API lets merchants initiate cashier payments from customers. This page covers Bolivia (country code bo, currency BOB).

Request URL

Domain: Prefer unified host openapi.toppayment.com (path unchanged); legacy country domain (e.g. global-bo-openapi.toppayment.com) remains available.

EnvironmentURL
Sandboxhttps://openapi.toppayment.com/sandbox/bo/pay/prePay
Productionhttps://openapi.toppayment.com/bo/pay/prePay

Bolivia currently supports YAPE only. See Regional Payment Guide — Bolivia.

Request Header

FieldRequiredTypeDescription
Content-TypeMStringFixed value: application/json

Request Body

FieldRequiredTypeDescription
mchNoMString(32)Merchant number
orderNumMString(64)Merchant order number
amountMNumber(32,8)Transaction amount; positive, an integer or at most two decimal places
productDetailMString(100)Product detail
methodMString(16)Payment method; currently YAPE only
payerAccountNoCString(64)Payer's Yape account; required when method=YAPE
timestampMString(13)Millisecond timestamp
customerNameMString(64)Payer name
customerEmailMString(64)Payer email
customerPhoneMString(32)Payer phone
expiryPeriodONumber(1-9999)Validity in minutes
downNotifyUrlMString(255)Async notification URL
redirectUrlOString(512)Redirect URL after payment
signMStringSignature; see Signature

Request Body Example

Content-type: application/json

Response

Response Body Parameters

FieldRequiredTypeDescription
successMBooleanRequest success flag
codeMString9999 = success
msgOStringResponse message
timeStampMNumberResponse timestamp (ms)
dataMObjectTransaction data
orderNumMStringMerchant order number
platOrderNumMStringPlatform order number
amountMNumberTransaction amount
feeMNumberFee
methodMStringPayment method, currently YAPE
productDetailMStringProduct detail
customerNameMStringPayer name
customerEmailMStringPayer email
customerPhoneMStringPayer phone
validTimeMNumberExpiry timestamp (ms)
cashierUrlMStringCashier URL; redirect the customer here to complete payment

Response Example

{
  "success": true,
  "code": "9999",
  "msg": null,
  "timeStamp": 1767840272829,
  "data": {
    "orderNum": "BO1234561",
    "platOrderNum": "PRE2009093829059153920",
    "amount": 100.50,
    "fee": 2.0,
    "method": "YAPE",
    "productDetail": "Product",
    "customerName": "Juan Perez",
    "customerEmail": "[email protected]",
    "customerPhone": "+59170000000",
    "validTime": 1767926672819,
    "cashierUrl": "https://example.cashier/pay"
  }
}

Notification

HTTP Request (callback)

FieldRequiredTypeDescription
Content-TypeMStringapplication/json

Notification Body

FieldRequiredTypeDescription
platOrderNumMStringPlatform order number
versionMStringAPI version, e.g. v1
orderNumMStringMerchant order number
amountMNumberAmount
feeMNumberFee
customerNameMStringCustomer name
customerEmailMStringCustomer email
customerPhoneMStringCustomer phone
statusMStringStatus — see Transaction Status Codes
signMStringCallback signature

Response

Verify the signature, then return the plain string SUCCESS only.

SUCCESS

Notification Example

{
  "platOrderNum": "PRE2009165141186183168",
  "version": "v1",
  "orderNum": "BO1234561",
  "amount": 100.50,
  "fee": 2,
  "customerName": "Juan Perez",
  "customerEmail": "[email protected]",
  "customerPhone": "+59170000000",
  "status": "SUCCESS",
  "sign": "…"
}