POST api/v1/payments/creditcard/refund
Refund a credit card. Funds will be returned to the credit card if approved.
Request Information
URI Parameters
None.
Body Parameters
CardTransactionBindingModel| Name | Description | Type | Additional information |
|---|---|---|---|
| Authentication | AuthenticationModel |
Required |
|
| Request | TransactionCardRequestModel |
Required |
Request Formats
application/json, text/json
Sample:
{
"Authentication": {
"Id": "170200123",
"Key": "467512342123"
},
"Request": {
"TransactionType": "(0 - authorize, 1 - charge, 2 - refund)",
"Card": {
"CardNumber": "4000000000000001",
"ExpiryDate": "12/19 (MM/YY)",
"CVV": "123 (3 or 4 digits, depending upon card scheme)"
},
"CaptureMethod": "(2 - ecommerce)",
"BillingAddress": {
"HouseNumber": "123 (optional)",
"ApartmentNumber": "4A (optional)",
"Street": "Welling Ave (optional)",
"Street2": "Houseblocks (optional)",
"City": "Saverton (optional)",
"Zip": "90001",
"County": "King (optional)",
"State": "WA (optional)",
"Country": "USA",
"CountryName": null,
"Country2AlphaCode": null,
"Country3AlphaCode": null,
"CountryNumericCode": null
},
"TransactionDateTime": "2025-11-15 12:22:42 (YYYY-MM-DD HH:MM:SS - UTC format)",
"Amount": "20.50 (include decimal places)",
"CurrencyCode": "USD (see ISO 4217 for correct currency codes)",
"TransactionReference": "2343-0988 (unique for each transaction)",
"Description": "Booking for workstation 23A (free form text)",
"DealType": null,
"DealStage": null,
"Email": "larry@newmedia.com (cardholder's email address)",
"Authorizer": "Secondhand Bank (use your approved authorizer)",
"Discount": {
"DiscountCode": "1234",
"Product": "Storage"
},
"Marketing": null,
"RevenuePartner": null,
"Name": null,
"SaveToFile": "true/false"
}
}
application/xml, text/xml
Sample:
<CardTransactionBindingModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Payments.Api.Models">
<Authentication>
<Id>170200123</Id>
<Key>467512342123</Key>
</Authentication>
<Request>
<Amount>20.50 (include decimal places)</Amount>
<Authorizer>Secondhand Bank (use your approved authorizer)</Authorizer>
<BillingAddress>
<ApartmentNumber>4A (optional)</ApartmentNumber>
<City>Saverton (optional)</City>
<Country>USA</Country>
<Country2AlphaCode i:nil="true" />
<Country3AlphaCode i:nil="true" />
<CountryName i:nil="true" />
<CountryNumericCode i:nil="true" />
<County>King (optional)</County>
<HouseNumber>123 (optional)</HouseNumber>
<State>WA (optional)</State>
<Street>Welling Ave (optional)</Street>
<Street2>Houseblocks (optional)</Street2>
<Zip>90001</Zip>
</BillingAddress>
<CaptureMethod>(2 - ecommerce)</CaptureMethod>
<Card>
<CVV>123 (3 or 4 digits, depending upon card scheme)</CVV>
<CardNumber>4000000000000001</CardNumber>
<ExpiryDate>12/19 (MM/YY)</ExpiryDate>
</Card>
<CurrencyCode>USD (see ISO 4217 for correct currency codes)</CurrencyCode>
<DealStage i:nil="true" />
<DealType i:nil="true" />
<Description>Booking for workstation 23A (free form text)</Description>
<Discount>
<DiscountCode>1234</DiscountCode>
<Product>Storage</Product>
</Discount>
<Email>larry@newmedia.com (cardholder's email address)</Email>
<Marketing i:nil="true" />
<Name i:nil="true" />
<RevenuePartner i:nil="true" />
<SaveToFile>true/false</SaveToFile>
<TransactionDateTime>2025-11-15 12:22:42 (YYYY-MM-DD HH:MM:SS - UTC format)</TransactionDateTime>
<TransactionReference>2343-0988 (unique for each transaction)</TransactionReference>
<TransactionType>(0 - authorize, 1 - charge, 2 - refund)</TransactionType>
</Request>
</CardTransactionBindingModel>
Response Information
Resource Description
CardTransactionOutgoingModel| Name | Description | Type | Additional information |
|---|---|---|---|
| Message | MessageModel |
None. |
|
| Response | CardTransactionResponseModel |
None. |
Response Formats
application/json, text/json
Sample:
{
"Message": {
"Code": "(2 digit code reflecting result of request - 00 is good)",
"Description": "(Message response in text depending upon request/result of request)"
},
"Response": {
"ResponseCode": "(1 - approved, 2 - declined, 3 - error, 4 - held for review, )",
"ResponseCodeText": "(Approved/Declined/Referred/Error/Error message)",
"AuthCode": "B800ZS1 (no value for refunds or voids)",
"AvsResultCode": "(A - address (street) matches, zip does not, B - address information not provided for avs check, E - avs error, G - non-u.s. card issuing bank, N - no match on address (street) or zip, P - avs not applicable for this transaction, R - retry—system unavailable or timed out, S - service not supported by issuer, U - address information is unavailable, W - nine digit zip matches, address (street) does not, X - address (street) and nine digit zip match, Y - address (street) and five digit zip match, Z - five digit zip matches, address (street) does not)",
"CvvResultCode": "(M - match, N - no match, P - not processed, S - should have been present, U - issuer unable to process request)",
"TransactionReference": "2343-0988 (will match your transaction reference)",
"TransactionID": "3212345 (must be used in follow up requests regarding this transaction)",
"CardType": "Visa (text stating the card type of the card used)",
"DiscountedAmount": "0.00",
"CustomerId": null,
"ProfileId": null
}
}
application/xml, text/xml
Sample:
<CardTransactionOutgoingModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Payments.Api.Models">
<Message>
<Code>(2 digit code reflecting result of request - 00 is good)</Code>
<Description>(Message response in text depending upon request/result of request)</Description>
</Message>
<Response>
<AuthCode>B800ZS1 (no value for refunds or voids)</AuthCode>
<AvsResultCode>(A - address (street) matches, zip does not, B - address information not provided for avs check, E - avs error, G - non-u.s. card issuing bank, N - no match on address (street) or zip, P - avs not applicable for this transaction, R - retry—system unavailable or timed out, S - service not supported by issuer, U - address information is unavailable, W - nine digit zip matches, address (street) does not, X - address (street) and nine digit zip match, Y - address (street) and five digit zip match, Z - five digit zip matches, address (street) does not)</AvsResultCode>
<CardType>Visa (text stating the card type of the card used)</CardType>
<CustomerId i:nil="true" />
<CvvResultCode>(M - match, N - no match, P - not processed, S - should have been present, U - issuer unable to process request)</CvvResultCode>
<DiscountedAmount>0.00</DiscountedAmount>
<ProfileId i:nil="true" />
<ResponseCode>(1 - approved, 2 - declined, 3 - error, 4 - held for review, )</ResponseCode>
<ResponseCodeText>(Approved/Declined/Referred/Error/Error message)</ResponseCodeText>
<TransactionID>3212345 (must be used in follow up requests regarding this transaction)</TransactionID>
<TransactionReference>2343-0988 (will match your transaction reference)</TransactionReference>
</Response>
</CardTransactionOutgoingModel>