Context
In order to enable & verify card payments, the Rafiki integration server will need to verify additional card details before funding (approving) an outgoing payment.
Whenever an outgoing payment was created through by a card transaction, the outgoing_payment.created webhook will contain additional payment/card details:
{
"id": "{{uuid}}",
"type": "outgoing_payment.created",
"walletAddressId": "{{customerWalletAddressUuid}}",
"data": {
...
"cardDetails": {
"requestId": "{{uuid}}",
"initiatedAt": "{{date}}",
"data": {
"signature":"", // generate AC response
"payload":"", // generate AC input
}
}
}
}
Using the signature and the payload in the cardDetails.data, the webhook integration server can now verify that the signature of the card transaction was valid.
Note: cardDetails is an optional field, as not every outgoing_payment.created webhook will contain this data.
Todos
Context
In order to enable & verify card payments, the Rafiki integration server will need to verify additional card details before funding (approving) an outgoing payment.
Whenever an outgoing payment was created through by a card transaction, the
outgoing_payment.createdwebhook will contain additional payment/card details:{ "id": "{{uuid}}", "type": "outgoing_payment.created", "walletAddressId": "{{customerWalletAddressUuid}}", "data": { ... "cardDetails": { "requestId": "{{uuid}}", "initiatedAt": "{{date}}", "data": { "signature":"", // generate AC response "payload":"", // generate AC input } } } }Using the
signatureand thepayloadin thecardDetails.data, the webhook integration server can now verify that the signature of the card transaction was valid.Note:
cardDetailsis an optional field, as not everyoutgoing_payment.createdwebhook will contain this data.Todos
cardDetailsin theoutgoing_payment.createdwebhookpayload&signature, and validate the signature is correctfundOutgoingPaymentmutationcancelOutgoingPaymentmutation, with thecardPaymentFailureReasonbeing equal toinvalid_signature.cancelOutgoingPaymentmutation, with thecardPaymentFailureReasonbeing equal toinvalid_request