Skip to content

Sandbox: Receive a payment

POST
/v1/simulations/inbound_payments
Code sample: Shell / cURL
curl --request POST \
--url https://api.b-paid.com/v1/simulations/inbound_payments \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: <X-Api-Key>' \
--data '{ "amount": 500000 }'

Simulates a payment to your sandbox account from the test account SIM-PAY-001-BZ. The payment completes at once, so the amount is available right away. Use it to add money to your sandbox account. Each call creates a new payment: this endpoint doesn’t use Idempotency-Key.

Media typeapplication/json

A payment to your sandbox account from the test account SIM-PAY-001-BZ.

object
amount
required

A positive integer in cents (USD), at most 99999999 ($999,999.99). For example, $1,450.00 is 145000.

integer format: int64
>= 1 <= 99999999

Example

{
"amount": 500000
}

The payment from SIM-PAY-001-BZ to you.

Media typeapplication/json

A payment between your account and another b-paid account, sent or received.

object
id

Unique identifier for the payment. The b-paid app shows it as the payment’s reference number. Treat it as an opaque string.

string
status

Where the payment stands.

  • pending: The payment is being processed. The money may already have moved. A payment with a due date is pending while it is being paid, and can be pending briefly before it is scheduled. It can be canceled only once it is scheduled.
  • scheduled: The payment is waiting for its due date. The amount is set aside from the sender’s available balance.
  • complete: The payment has been paid. This is final.
  • failed: The payment was not paid, for example because the sender’s available balance was too low, or because by the due date one of the accounts could no longer send or receive payments. Any amount set aside is returned to the sender’s available balance. To find out why a payment failed, contact b-paid support with its id. This is final.
  • canceled: The sender canceled the scheduled payment. The amount is returned to the sender’s available balance. This is final.
string
Allowed values: pending scheduled complete failed canceled
amount

The payment amount in cents (USD), as created. It never changes.

integer format: int64
amount_paid

The amount paid in cents (USD), once the payment is complete; null until then. If the recipient accepted quick pay, this is amount minus the discount.

integer format: int64
nullable
source_account_id

The bpid of the account that sends the payment.

string
destination_account_id

The bpid of the account that receives the payment.

string
net_terms_days

The number of days from creation to the due date. null for a payment made now.

integer format: int32
nullable
quick_pay_percent

The quick pay discount, in percent, offered to the recipient for being paid before the due date. null if none was offered.

number format: double
nullable
scheduled_for

The ISO 8601 date and time at which the payment is due. The payment is made shortly after this time. null for a payment made now. A payment the recipient accepted early with quick pay keeps its original scheduled_for.

string format: date-time
nullable
created_at

The ISO 8601 date and time at which the payment was created.

string format: date-time

Example

{
"id": "BPT-000000-000003-00",
"status": "complete",
"amount": 500000,
"amount_paid": 500000,
"source_account_id": "SIM-PAY-001-BZ",
"destination_account_id": "ACC-ONE-000-BZ",
"net_terms_days": null,
"quick_pay_percent": null,
"scheduled_for": null,
"created_at": "2026-09-22T17:42:08.1234567Z"
}

No payment was made (invalid_parameters_error): amount is missing or out of range, a field is unknown, or a query parameter is unknown. detail says what to fix.

The API key is missing, unknown or revoked (invalid_api_key_error).

API access isn’t turned on for your account (insufficient_permissions_error); b-paid support can turn it on. Or your business isn’t verified yet (verification_required_error); finish verifying it in the b-paid app.

Sandbox operations work only with a sandbox key. A live key gets api_method_not_found_error.

The payment could not be made (invalid_operation_error). Contact b-paid support.

Send the body as Content-Type: application/json (unsupported_media_type_error).

Too many requests (rate_limited_error). Wait the number of seconds in the Retry-After header, then retry.

Retry-After
integer

Seconds to wait before retrying.

Something went wrong on our side (internal_server_error).

The b-paid API is temporarily unavailable (service_unavailable_error).