API refundCheckout

[OPTIONAL API]

Refund of a payment (Merchant Server > Tinaba). This API can be used to make a full or partial refund.

Attribute explanation

Name of domainTypeMandatoryDescription
merchantIdStringYesIdentifier of the merchant assigned by TINABA
externalIdStringYes

The identifier of the pending payment on the merchant's server.It must be unique for each call

amountStringYesAmount in cents
signatureStringYesAuthentication and data integrity signature

The data integrity signature, exchanged in the "signature" field, is based on a shared secret, exchanged offline, and generated using the SHA256 protocol.

signature = base64(SHA256(<merchantId><externalId><secret>))

For more information on how to generate the integrity signature, see:

Data integrity >

Attribute explanation – response

Name of domainTypeMandatoryDescription
statusStringYes000 = OK







001 = KO
errorCodeStringNoValued only if status = 001










Error code

Request


{  
   "data":{  
      "request":{  
         "refundCheckoutRequest":{  
            "merchantId":"12",
            "externalId":"TR_1",
            "amount":"100",
            "signature":"AAIR12345"
         }
      }
   }
}

Answers

200 Success


{  
   " response":{  
      "refundCheckoutResponse":{  
         "status":"000"
      }
   }
}

400 Error Validation


{  
   " response":{  
      "refundCheckoutResponse":{  
         "status":"001",
         "errorCode":"XXX",
      }
   }
}

$request = new VerifyCheckoutRequest();

$request->setExternalId('TR_01');

$response = $client->verifyCheckout($request);

echo "The checkout status is " . $response->checkoutStatus;

For the full PHP SDK visit this link


from sdk.objects import RefundCheckoutRequest
action = factory.make('refund.checkout')
action.body_params = RefundCheckoutRequest(externalId='TR_01',
                                           amount='100')  # expressed in cents
response = action.run()

For the full PHP SDK visit this link