Credit payment

Using the Backoffice API, you can send a credit payment POST request from server-to-server. You will need to enter the card details, payment, and billing details.

Or you can send a credit payment using a card registration from a COPYandPAY checkout. You will need the card registration ID.


Credit request with card details

Here is an example of a test credit request with card details from a server-to-server environment.

Replace the {channelId} and the {auth_token} with your values.

curl https://eu-test.oppwa.com/v1/payments \
 -d "entityId={channelId}" \
 -d "amount=100.00" \
 -d "currency=EUR" \
 -d "paymentBrand=VISA" \
 -d "paymentType=CD" \
 -d "card.number=4200000000000000" \
 -d "card.holder=John Smith" \
 -d "card.expiryMonth=02" \
 -d "card.expiryYear=2027" \
 -d "card.cvv=123" \
 -d "merchantTransactionId=P175" \
 -d "testMode=EXTERNAL" \
 -H "Authorization: Bearer {auth_token}"

From the payment response, store the id of the successful request for future reference.

For a successful transaction, the response code is 200.


Credit response with card details

Here is an example response for a successful credit transaction in a SERVER-TO-SERVER environment.

{
  "id": "8ac7a4a192b3b5060192b471c0d82dfb",
  "paymentType": "CD",
  "paymentBrand": "VISA",
  "amount": "100.00",
  "currency": "EUR",
  "descriptor": "7548.8324.7369 ECOMChannel ",
  "merchantTransactionId": "P175",
  "result": {
    "code": "000.100.112",
    "description": "Request successfully processed in 'Merchant in Connector Test Mode'"
  },
  "resultDetails": {
    "ExtendedDescription": "Approved or completed successfully",
    "clearingInstituteName": "Postbank P.O.S. Transact GmbH",
    "ConnectorTxID1": "852105",
    "ConnectorTxID3": "26K00001",
    "AcquirerResponse": "00",
    "reconciliationId": "P175",
    "merchantAccountId": "8a8294184f1d2f31014f25d1b00609b9"
  },
  "card": {
    "bin": "420000",
    "last4Digits": "0042",
    "holder": "John Smith",
    "expiryMonth": "02",
    "expiryYear": "2027"
  },
  "risk": {
    "score": "0"
  },
  "buildNumber": "1a09c7f6b69eaea67758a3050d39aeeeeec97625@2024-10-21 15:02:36 +0000",
  "timestamp": "2024-10-22 13:36:46+0000",
  "ndc": "8ac7a4c890fc748b0190fe6ad56b0241_cf4d3a0aa0f342e3a5837f7af9b5d994",
  "source": "OPP",
  "paymentMethod": "CC",
  "shortId": "7548.8324.7369"
}

For full details of how to interpret a transaction response, see Transaction results.

For the gateway documentation of the Backoffice API, see Gateway Backoffice API documentation for Payout. Note that the credit request is described as a payout because the most common use case for this request is to make a standalone refund to a customer when a regular refund is not possible.


Test credit with card details

You can test this request at Gateway Playground Credit Payment with the parameters as shown in the sample data here.

entityId={channelId}
amount=100.00
currency=EUR
paymentBrand=VISA
paymentType=CD
card.number=4200000000000000
card.holder=John Smith
card.expiryMonth=02
card.expiryYear=2027
card.cvv=123
merchantTransactionId=P175
testMode=EXTERNAL


Credit request with a registered card

You can make a credit request using card details you previously registered, for example, for metered payments or one-click checkout. You will need the card token registrationId but you do not need to add any other specific parameters or customer details to the request.

Here is an example of a test credit request with a registered card.

Replace the {id} with the registrationId for the customer's card, and the {channelId} and the {auth_token} with your values.

curl https://eu-test.oppwa.com/v1/registrations/{id}/payments \
 -d "entityId={channelId}" \
 -d "paymentType=CD" \
 -d "amount=17.99" \
 -d "currency=EUR" \
 -d "merchantTransactionId=P175" \
 -d "testMode=EXTERNAL" \
 -H "Authorization: Bearer {auth_token}"

From the payment response, store the id of the successful request for future reference.

For a successful transaction, the response code is 200.


Example response with registered card

Here is an example response for the successful test credit transaction with a registered card.

{
  "id":"8ac7a4a09780fc6a01978219fe113f61",
  "paymentType":"CD",
  "amount":"17.99",
  "currency":"EUR",
  "descriptor":"0552.1149.6322 MOTOChannel ",
  "merchantTransactionId":"P175",
  "result":{
    "code":"000.100.112",
    "description":"Request successfully processed in 'Merchant in Connector Test Mode'"
  },
  "resultDetails":{
    "ExtendedDescription":"Approved or completed successfully",
    "clearingInstituteName":"Postbank P.O.S. Transact GmbH",
    "ConnectorTxID1":"700676",
    "ConnectorTxID3":"26K00001",
    "AcquirerResponse":"00",
    "reconciliationId":"P175",
    "merchantAccountId":"8a8294184f1d2f31014f25d1b00609b9"
  },
  "risk":{
    "score":"0"
  },
  "buildNumber":"e1ddd751d5b4a7bd89ed8838e38be61e687f3b56@2025-06-18 00:42:25 +0000",
  "timestamp":"2025-06-18 08:13:51+0000",
  "ndc":"8ac7a4c890fc748b0190fe6a7ad7023d_cde0a8b44ca04423be063deceabb763e",
  "standingInstruction":{
    "source":"MIT",
    "type":"UNSCHEDULED",
    "mode":"REPEATED"
  },
  "source":"OPP",
  "paymentMethod":"CC",
  "shortId":"0552.1149.6322"
}

Test credit with registered card

To try this in the gateway playground, see the section on Sending a subsequent payment in the Gateway Backoffice API documentation for Card on File. Use the payment type CD and the set of parameters as shown in the following example.

entityId={channelId}
paymentType=CD
amount=17.99
currency=EUR
merchantTransactionId=P175
testMode=EXTERNAL 

To obtain more information about a credit request in general, see the Gateway Backoffice API documentation for Payout, which is the SERVER-TO-SERVER version of this request.