Your API credentials

Find your keys in the Developer section of your 3ribe dashboard.

Keep secret keys backend-only.
DocumentationCollection API
VERSION 3.0 / REST / JSON / HTTPS

Collection API

Accept payments on your website or app with Card Pay, Apple Pay, Google Pay and Pay By Bank. Follow the transaction journey from initiation to verified payment.

Card PayApple PayGoogle PayPay By Bank
A successful request is not a successful payment
responseStatus: true means the API request was accepted. Verify the final transaction status before marking an order as paid or fulfilling it. A customer redirect is not payment confirmation.
GET STARTED

Environments & authentication

Use sandbox for development and testing. Switch to production only after the integration has been tested and approved. All API requests use HTTPS.

EnvironmentBase URLEnvironment / Base URL
SandboxDevelopment & testing
https://merchantb2bstagingapi.3ribestaging.com
ProductionAfter testing & approval
https://businessapis.3ribe.io

Authenticate every request

Retrieve merchant credentials from the Developer section of your 3ribe dashboard. Include the following headers on collection requests.

Required request headersHTTP
apikey: YOUR_API_KEY
apisecretkey: YOUR_API_SECRET_KEY
Content-Type: application/json
ParameterDescriptionParameter / Description
apikeyHeader
Merchant API key.
apisecretkeyHeader
Merchant API secret key.
Content-TypeHeader
application/json
Keep credentials on your backend
Never expose apisecretkey in frontend or mobile code. Store keys securely, separate sandbox from production credentials and contact 3ribe if credentials are compromised.

Endpoint reference

Append the endpoint path to your environment’s base URL. The first three operations require the merchant headers above.

POST/api/GrantsCollection/initiatetransaction
POST/api/GrantsCollection/processtransaction
POST/api/GrantsCollection/processissuertransaction
TBC/api/collection/status
Status contract requires confirmation
The status endpoint’s HTTP method and request parameters are not specified. Confirm both with 3ribe before implementing this operation.

Payment flow

  1. 01Initiate — send the amount, currency, merchant details and exact paymentMethod value. Store the returned transactionReference and your original requestReference.
  2. 02Process — for an approved direct card integration, submit billing and card details against the initiated reference. Other payment methods use their approved processing flows.
  3. 03Authenticate — follow returned 3DS HTML or authentication redirect instructions. Use issuer processing only when required by that flow.
  4. 04Verify — check the final transaction status, update your payment record and fulfil only after confirming successful payment.
paymentMethod valuePayment channelpaymentMethod value / Payment channel
Card PayExact string
Debit and credit card payments.
Apple PayExact string
Eligible cards stored in Apple Wallet.
Google PayExact string
Eligible cards stored in Google Wallet.
Pay By BankExact string
Direct payments from supported bank accounts.
COLLECTION OPERATIONS

Initiate transaction

POST/api/GrantsCollection/initiatetransaction

Create a collection transaction. Send the amount, currency, merchant slug, payment method and transaction purpose. The API returns a transaction reference and a payment URL where applicable.

Request body · source exampleJSON
{
  "amount": 100,
  "requestReference": "TRN66865587",
  "currency": "GBP",
  "slug": "Moduconsults",
  "paymentMethod": "Pay By Bank",
  "transactionPurpose": "Payment",
  "redirectUrl": "https://3ribeadmin.vercel.app",
  "hasPciDss": true
}
Choose your approved PCI configuration
The source example includes hasPciDss: true. Do not copy that value unless your merchant has the required PCI DSS approval and 3ribe has confirmed direct processing. Use false for the hosted flow.

Request parameters

ParameterDescriptionParameter / Description
amountNumber
Amount to be collected.
requestReferenceString
Unique transaction reference generated by the merchant.
currencyString
Transaction currency, for example GBP.
slugString
Merchant identifier registered with 3ribe.
paymentMethodString
Exact value: Card Pay, Apple Pay, Google Pay or Pay By Bank.
transactionPurposeString
Description or purpose of the transaction.
redirectUrlString
Merchant return URL after the payment flow, where applicable.
hasPciDssBoolean
Applicable PCI DSS configuration. true requires approved direct processing; false uses the hosted payment page.
Successful initiation · source responseJSON
{
  "responseStatus": true,
  "responseMessage": "Payment initialised successfully",
  "transactionReference": "TRN18412533288B",
  "paymentUrl": "https://grantspaymentsandboxpay.3ribe.io?name=Moduconsults&currency=GBP&amount=100&narration=Payment&transref=TRN18412533288B&paymentmethod=Pay By Bank&id=39057d635dfc456e9bc204e2e6b8db6f&bankurl=https://sandbox.paybylink.volumepay.io?paymentIntentId=4b5425a6-67f7-4d3a-93e1-00323043ec7c",
  "merchantDescription": "Payment"
}

Response parameters

ParameterDescriptionParameter / Description
responseStatusBoolean
Whether the initiation request was successful; not final payment confirmation.
responseMessageString
Description of the initiation result.
transactionReferenceString
Unique transaction reference generated by 3ribe.
paymentUrlString
Payment destination used to continue the customer journey.
merchantDescriptionString
Merchant-provided transaction description.

Continue the transaction

  1. 01Store transactionReference and retain requestReference for reconciliation.
  2. 02Use paymentUrl for a hosted payment journey. Treat it as an opaque destination: do not construct or modify its query parameters.
  3. 03For the approved direct card flow, continue to Process Transaction. Do not create a second transaction simply because the customer has not completed the journey.

Process transaction

POST/api/GrantsCollection/processtransaction

Process an initiated transaction when collecting card details directly through the approved card-processing integration. The response may include HTML for 3DS Method authentication.

Direct card processing only
This card-details payload is not the wallet or bank processing contract. Do not send arbitrary card data for Apple Pay, Google Pay or Pay By Bank. Confirm the approved processing flow for each method.
Request body · sandbox card exampleJSON
{
  "amount": 100,
  "transactionReference": "TRN72220445257C",
  "billingEmail": "customer@example.com",
  "billingFirstName": "TEST",
  "billingLastName": "CUSTOMER",
  "billingAddress": "10 Example Street",
  "billingCity": "London",
  "billingState": "London",
  "billingPostalCode": "SW1A 1AA",
  "billingCountry2LetterCode": "GB",
  "cardNumber": "4918190000000002",
  "cardMonth": "12",
  "cardYear": "2033",
  "cardCvv": "123",
  "billingPhoneNumber": "+441234567890",
  "userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 Chrome/150.0.0.0 Safari/537.36"
}

Request parameters

The specification lists the following fields and types. Required/optional flags are not supplied; confirm validation rules with 3ribe.

ParameterDescriptionParameter / Description
amountNumber
Amount to be processed.
transactionReferenceString
Reference returned by initiation. The source examples show different references; use your own returned value throughout the flow.
billingEmailString
Customer billing email address.
billingFirstNameString
Customer first name.
billingLastNameString
Customer last name.
billingAddressString
Customer billing address.
billingCityString
Billing city.
billingStateString
Billing state or region.
billingPostalCodeString
Billing postal or ZIP code.
billingCountry2LetterCodeString
Two-letter ISO country code, for example GB.
cardNumberString
Card number. Approved direct card integration only.
cardMonthString
Card expiry month.
cardYearString
Card expiry year.
cardCvvString
Card security code.
billingPhoneNumberString
Customer billing phone number.
userAgentString
Browser or client user-agent string.
Authentication required · source responseJSON
{
  "amount": 100,
  "responseMessage": "Transaction requires authentication",
  "responseStatus": true,
  "transactionReference": "TRN72220445257C",
  "isSettledIntoWallet": false,
  "iFrameHtml": "<!DOCTYPE html>\r\n<html>\r\n<head>\r\n    <meta charset=\"UTF-8\">\r\n</head>\r\n<body>\r\n    <iframe width=\"5000\" height=\"500\" id=\"threeDSMethodIframe\" name=\"threeDSMethodIframe\"></iframe>\r\n    <form id=\"threeDSMethodForm\" name=\"threeDSMethodForm\" enctype=\"application/x-www-form-urlencoded;charset=UTF-8\" style=\"display:none\" method=\"post\" action=\"https://staging.gate.emerchantpay.net/threeds/threeds_method\" target=\"threeDSMethodIframe\">\r\n        <input type=\"hidden\" name=\"unique_id\" value=\"55aee074ab27d1b65fb5e04960fe8153\" />\r\n        <input type=\"hidden\" name=\"signature\" value=\"aa02ab40160c7b4e49cb6020003aa3185857e6a47ff9b072771ea81786d597a37fba83fc1cbc28cda135236ff3276c608c6998b88cdd3a26b25f452af3559013\" />\r\n    </form>\r\n    <script>\r\n        document.getElementById(\"threeDSMethodForm\").submit();\r\n    </script>\r\n</body>\r\n</html>",
  "partiallyApprovedAmount": 0,
  "isPartiallyApproved": false
}
Use the actual authentication HTML
Always take iFrameHtml from the API response. Never hardcode the sample authentication URL, unique ID or signature. responseStatus: true here indicates acceptance of the processing request, not completed payment.
ParameterDescriptionParameter / Description
amountNumber
Transaction amount.
responseMessageString
Processing result or next-step instruction.
responseStatusBoolean
Whether the processing request was accepted.
transactionReferenceString
Reference being processed.
isSettledIntoWalletBoolean
Whether the transaction has settled into the wallet.
iFrameHtmlString
Returned HTML for the 3DS Method process.
partiallyApprovedAmountNumber
Amount partially approved, where applicable.
isPartiallyApprovedBoolean
Whether the transaction was partially approved.

3DS & issuer authentication

3-D Secure authenticates eligible card transactions. A frictionless flow needs no interactive customer action; a challenge may require a one-time password, banking app approval or another issuer-defined action.

Handle the returned authentication instructions

  1. 01Inspect the processing response. When iFrameHtml is returned, render the supplied HTML using the approved integration approach.
  2. 02The HTML creates an iframe and hidden form, then submits authentication information to the 3DS Method endpoint. Use the returned HTML instead of generating your own form.
  3. 03Allow any customer challenge to finish. If the applicable response returns redirectUrl, follow that authentication URL; it is not the merchant’s return URL.
  4. 04Continue with issuer processing after the iframe script completes, only when the preceding authentication flow requires it. Then verify the payment outcome.

Process issuer transaction

POST/api/GrantsCollection/processissuertransaction

This operation supports the issuer-processing stage of 3DS and uses the same merchant headers. The exact request and response bodies are not included in the supplied documentation.

Obtain the issuer contract before implementation
Confirm required fields, the transaction-reference field name, issuer authentication data, response properties, success/failure examples and whether the endpoint returns a redirect, challenge content or another instruction. Do not infer its payload from the Process Transaction response.

PCI DSS configuration

hasPciDss valueProcessing configurationhasPciDss value / Processing configuration
falseBoolean
Hosted payment page. The customer uses the 3ribe hosted flow; do not collect or store raw card details on your own systems.
trueBoolean
Approved direct card processing only. Maintain applicable PCI DSS controls and confirm your processing arrangement with 3ribe.
Approval is required for direct processing
Do not set hasPciDss to true unless the merchant holds the required PCI DSS approval and 3ribe has confirmed that integration method.
PAYMENT METHODS

Wallets & Pay By Bank

Apple Pay

Enable Apple Pay in the merchant payment configuration and use an eligible integration. Meet Apple’s domain and security requirements where applicable and use the Apple Pay payment data and flow approved by 3ribe.

  1. 01Customer selects Apple Pay; initiate with paymentMethod: "Apple Pay".
  2. 02Present the Apple Pay interface and let the customer authorise.
  3. 03Submit Apple Pay payment information using the approved 3ribe flow, then verify the final status.

Sandbox: configure an Apple Pay sandbox tester and the appropriate environment. Testing guide: https://developer.apple.com/apple-pay/sandbox-testing/

Google Pay

Enable Google Pay for the merchant and configure the correct environment. Use the payment token returned by Google Pay and submit it through the approved 3ribe processing flow.

  1. 01Customer selects Google Pay; initiate with paymentMethod: "Google Pay".
  2. 02Google Pay presents available payment instruments. The customer selects one and authorises payment.
  3. 03Use the returned payment token in the approved processing flow, then verify final status.

Sandbox: use Google Pay Test Mode and the applicable Test Mode Stub Data Group to generate test payment information.

Wallet token schemas are not yet supplied
Obtain the exact Apple Pay and Google Pay token processing request and response schemas from 3ribe. Do not reuse the direct card payload.

Pay By Bank

  1. 01Customer selects Pay By Bank; initiate with paymentMethod: "Pay By Bank".
  2. 02Send the customer to the returned paymentUrl. They select a supported bank, authenticate and authorise the payment.
  3. 03Handle the return to the configured merchant URL where applicable. Verify final status before fulfilment.
Sandbox credentialValueSandbox credential / Value
BankSandbox only
NatWest Sandbox
Customer NumberSandbox only
123456789012
PIN 1Sandbox only
572
PIN 2Sandbox only
436

In the sandbox journey, choose NatWest Sandbox, enter the customer number and requested PIN values, select the Payment account and confirm. These credentials are for sandbox use only.

Verification & redirects

TBC/api/collection/status

Verify the final transaction after processing and after the customer returns. Retain the initiation reference, use the agreed transaction identifier, inspect paymentStatus and update the corresponding order. Fulfil only after a confirmed successful payment.

Cancelled transaction · source responseJSON
{
  "responseStatus": false,
  "message": "Transaction cancelled",
  "data": {
    "paymentStatus": "CANCELLED",
    "transactionReference": "ORDER-20261030-001"
  }
}
ParameterDescriptionParameter / Description
responseStatusBoolean
Response outcome.
messageString
Description of the transaction result.
dataObject
Transaction information.
data.paymentStatusString
Transaction payment status. The source example is CANCELLED.
data.transactionReferenceString
Reference being verified.
Do not assume a status contract
Confirm the HTTP method, query/body parameters, successful response and complete payment-status list with 3ribe. No polling interval is specified; use an agreed polling policy.

Keep the three destinations distinct

FieldPurposeField / Purpose
redirectUrlInitiation request
Merchant return URL. It must be publicly accessible over HTTPS.
paymentUrlInitiation response
Payment destination returned by 3ribe. Use as returned; do not construct or edit its query parameters.
iFrameHtmlProcessing response
HTML for 3DS Method authentication.

Handle successful, failed and cancelled customer journeys. A return redirect or URL query parameter is not authoritative proof of payment; always verify the transaction.

Webhooks & payment notifications

Use the Webhook API to configure and retrieve the merchant receiver URL. Process notifications idempotently to avoid updating the same transaction more than once.

Management API ≠ incoming event contract
Confirm the notification method and content type, payload, event types, validation/signature mechanism, acknowledgement format, retries and delivery policy before implementing event processing. These details are not supplied.
TEST YOUR INTEGRATION

Sandbox test cards

Sandbox only — never use these in production
Use these cards in the applicable 3DS sandbox environment. For challenge cards, select the required challenge result during authentication. “—” reproduces an unspecified value in the source.
Card / authentication flagsExpected resultCard / authentication flags / Expected result
4012000000060085Method — / Challenge —
Frictionless Authenticated
4901170000000003Method — / Challenge —
Frictionless Authenticated
4901164281364345Method — / Challenge —
Frictionless Authenticated
4378510000000004Method — / Challenge —
Frictionless Authenticated
4066330000000004Method Y / Challenge —
Frictionless Authenticated
5200000000001021Method Y / Challenge —
Frictionless Authenticated
4456530000001005Method — / Challenge —
Frictionless Attempted
5200000000001054Method — / Challenge —
Frictionless Attempted
5169750000001111MasterCard · Method — / Challenge —
Low-risk exemption: Authenticated. Synchronous 3DS workflow only.
4378510000000004Visa · Method — / Challenge —
Low-risk exemption: Authenticated. Synchronous 3DS workflow only.
4111110000000922Method — / Challenge —
Frictionless Not Authenticated
5200000000001047Method — / Challenge —
Frictionless Not Authenticated
4111112232423922Method Y / Challenge —
Frictionless Not Authenticated
4918190000000002Method — / Challenge Y
Choose Challenge result
5433300000000133Method — / Challenge Y
Choose Challenge result
4938730000000001Method Y / Challenge Y
Choose Challenge result
5200000000001005Method Y / Challenge Y
Choose Challenge result

Errors & security

ScenarioRecommended actionScenario / Recommended action
Invalid API credentials
Verify the API key and secret key.
Missing request fields
Validate the request payload.
Unsupported payment method
Confirm the exact paymentMethod value.
Initiation failure
Inspect the response; do not proceed with processing.
Processing failure
Inspect the response and verify transaction status.
Authentication required
Follow the returned 3DS instructions.
Customer cancellation
Verify status before updating the order.
Transaction pending
Check status again according to the agreed polling policy.
Network timeout
Check status before attempting another payment.
Duplicate reference
Verify the existing transaction before initiating another.

Protect credentials and payment information

  1. 01Use HTTPS, keep credentials backend-only and restrict access to payment-processing functions. Never put API credentials or sensitive payment information in logs.
  2. 02Use only processing methods approved for your PCI DSS configuration. Do not store cardholder data unless permitted by the applicable PCI DSS requirements.
  3. 03Use a unique merchant reference per payment attempt. Implement duplicate-request and duplicate-payment protection; verify uncertain transactions before retrying.
  4. 04Validate incoming notifications using the agreed mechanism. Maintain secure audit logs for reconciliation and show customer-friendly errors.
Error format not specified
The source does not define a standard API error response structure or HTTP status-code catalogue. Confirm both with 3ribe rather than assuming a schema.

Integration checklist

StageImplementation checklistStage / Implementation checklist
Merchant configuration
Obtain sandbox keys; set the sandbox base URL, merchant slug and return URL. Confirm enabled payment methods and the PCI DSS configuration.
Backend
Implement initiation and store references. Add approved card processing, issuer processing when required and status verification. Add secure logs and duplicate-request protection.
Frontend
Present enabled methods; send initiation through your backend. Handle paymentUrl, approved card processing, 3DS, wallet flows, bank redirection and the merchant return URL. Display only the verified payment outcome.
Sandbox testing
Test initiation, successful/unsuccessful cards, frictionless/challenge 3DS, Apple Pay sandbox, Google Pay Test Mode and NatWest Pay By Bank. Test verification, duplicate requests, timeouts and webhook processing where enabled.
Production deployment
Obtain production keys and base URL. Confirm enabled methods, PCI DSS approval and webhook configuration. Verify the public HTTPS return URL, perform controlled transactions and verify outcomes before opening payments to customers.

Outstanding details

The source is not a complete implementation contract for every flow. Resolve these items with 3ribe before building the affected operations or going live.

API areaConfirmation requiredAPI area / Confirmation required
Issuer transaction
Exact request fields and successful/failed response examples; transaction-reference field; issuer authentication data and next-step instructions.
Transaction status
HTTP method, query/body parameters, successful response and complete supported status values.
Apple Pay & Google Pay
Exact wallet-token processing request and response schemas.
Incoming webhooks
Notification method, content type, payload and event types; verification, acknowledgement, retries and delivery policy.
Error responses
Standard response structure and HTTP status codes.
CONTINUE READINGWebhook APIConfigure and retrieve your webhook receiver URL.
3ribe API reference · v3.0REST / JSON