409Conflict
Retrieve the original payment or correct the conflicting request. Do not invent a new key blindly.
Merchant integration
Create provider-neutral payment methods and payment sessions, handle customer authentication, and receive signed status updates from one API.
Use test credentials to exercise the complete integration without moving money.
Switch to live credentials when the integration is ready to process payments.
https://api.paybridge.cloud
Get started
Keep secret keys on your server, exchange card details for a PayBridge payment-method ID, then create payment sessions with a stable idempotency key.
Test and live keys use the same host. The key determines the processing mode.
Persist only the returned pmt_ ID after the card boundary.
Use one idempotency key per logical attempt and reuse it for safe retries.
curl https://api.paybridge.cloud/api/v1/payment-sessions \
--request POST \
--header "x-api-key: $PAYBRIDGE_SECRET_KEY" \
--header "Idempotency-Key: checkout-order_1042-v1" \
--header "Content-Type: application/json" \
--data '{
"operation": "Deposit",
"websiteCode": "store-cr",
"variantCode": "card",
"amount": "42.50",
"currency": "USD",
"merchantReference": "order_1042",
"customer": { "externalCustomerId": "customer_88" },
"paymentDetails": {
"kind": "Card",
"entryMode": "Token",
"token": { "type": "PayBridge", "value": "'$PAYMENT_METHOD_ID'" }
}
}'
Core model
The create response may already be final, require customer action, or wait for the processor. Webhooks and retrieval converge on the same session state.
PendingSession accepted and processing has not started.ProcessingThe request is currently with the processor.WaitingForCustomerRedirect or 3DS authentication is required.WaitingForProviderThe processor will deliver an asynchronous result.Completed · Failed · Cancelled · ExpiredThe session reached a final state.Customer authentication
When nextAction is present, send the customer to its destination. After
the customer returns, your server resumes the PayBridge session.
nextActionPOST /payment-sessions/{id}/resumeThe redirect carries navigation, not payment truth. Read the session status.
Money movement
| Operation | Use | Required input |
|---|---|---|
| Deposit | Sale or customer payment | paymentDetails |
| Authorize | Reserve funds without capture | paymentDetails |
| Capture | Settle an authorization | originalSessionId |
| Refund | Return a completed payment | originalSessionId |
| Void | Cancel an authorization | originalSessionId |
Failure handling
409Retrieve the original payment or correct the conflicting request. Do not invent a new key blindly.
422Fix the indicated field or business rule. Repeating the same request cannot succeed.
429 / 503Retry with exponential backoff and the same idempotency key.